package com.wen.factory;

import com.wen.factory.entity.Human;

public class HumanFactoryImpl extends HumanFactory {
    @Override
    public <T extends Human> T getHuman(Class<T> c) {
        Human human = null;
        try {
            human = (T) Class.forName(c.getName()).newInstance();
        }catch (Exception e){
            System.out.println("创建人种失败");
        }
        return (T)human;
    }
}
